package com.xingkeduo.model.bo;

import com.xingkeduo.util.pojo.base.BaseEnum;

/**
 * @Author: 中文输入法发挥不稳定的刘川
 * @Date: 19-3-18 下午5:08
 */
public enum AttendanceTypeEnum implements BaseEnum {
    MORNING_SHIFT(1, "早班"), NIGHT_SHIFT(2, "晚班"), ALL_DAY_SHIFT(3, "全班"),
    SICK_LEAVE(4, "病假"), PERSONAL_LEAVE(5, "事假"),
    NO_SCHEDULE(6, "无排班"),
    ASSIST(7, "支援"),
    PROVISIONAL(8, "临时");

    private int value;
    private String desc;

    private AttendanceTypeEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }


    public static AttendanceTypeEnum getAttendanceType(int value) {
        AttendanceTypeEnum[] attendanceTypeEnums = values();

        for (int i = 0; i < attendanceTypeEnums.length; ++i) {
            if (attendanceTypeEnums[i].getValue() == value) {
                return attendanceTypeEnums[i];
            }
        }

        return null;
    }


    @Override
    public int getValue() {
        return this.value;
    }

    public String getDesc(){
        return this.desc;
    }
}


